Project Setup

We assume you have completed all the necessary preparations described in the previous section of this chapter.

- In the Launch Pad, choose Project > New Project... > with Wizard... to start the Project Setup Wizard.

In the Project Setup Wizard
The Wizard starts by asking you to select how you intend to use the new SNiFF+ project.

- Accept the default selection, Standard Setup, and press Next.
The "Select development task" page appears.
In the remaining steps, we will refer to the names of Wizard pages. You can find a page's name in the title bar of the Wizard.

In the "Select development task" page

- Select Create a new SNiFF+ Project from scratch and press Next.

In the "Your development organization" page
This tutorial starts off with a single-user development situation using RCS for configuration management and version control, we will later add a new team member to quickly make it a multi-user development situation so:

For the radio buttons, accept the defaults (No/No).
From the drop-down, choose RCS.

| Note
| RCS must be available or installed on your computer. If RCS isn't already installed, install RCS from the SNiFF+ package.

3. Press Next.

In the "Select file types" page

- Select Java and press Next.
HTML and Visaj_Project are automatically added when you select Java. Note that, after project setup, you can always add more file types. How to do so is described in the User's Guide.

| Note - Multi Language Projects
| If you are using SNiFF+ Make Support, a directory can only contain Java files. It is not possible to build a project correctly if source files of other languages are located in the same directory. To avoid this problem, store these files in separate directories and create separate projects for them.

In the "Specify Repository" page
You are asked to specify your Repository (RWE) root directory. We will use the repository root directory, <sniff_java>/repository .

Press Browse....
In the Directory dialog, navigate to

<sniff_java>/repository , open it and press Select.
In the RWE name field, enter a name for the RWE, e.g., repository .
Press Next.
In the "Specify Private Working Environment" page
You are asked to specify your Private Working Environment (PWE) root directory. We will use the PWE_1 root directory, <sniff_java>/pwe_1.

Press Browse.
In the Directory dialog, navigate to

<sniff_java>/pwe_1 , open it and press Select.
In the PWE name field, enter a name for the PWE, e.g., pwe_1 .
Notice that your user name is entered next to the selected Owner check box. SNiFF+ needs your user name to correctly handle permissions. Being the owner of the PWE means that you are the only one who is allowed to modify its attributes.
Press Next.
In the "Create New SNiFF+ Project" page
SNiFF+ automatically enters the root of your Private Working Environment (PWE) in the Project root directory field.

Modify the entry in the Project root directory field to specify the root directory of the new project. This is:

<sniff_java>/pwe_1/OfficeApp
Notice that the new project's name has changed to OfficeApp .
Accept the default project name.

| Note
| When you are running SNiFF+ in "personal mode", you must accept the default project name to be able to open the example project once you've added JDK as a subproject (we will do so later).

- The
OfficeApp directory, which does not itself contain any source code files, is the root directory where your source code packages start. Remember that, according to the Java language specification, the class path to the package root always ends one directory level higher than the highest-level directory containing named package code.
So leave the Source Package Root field blank. When the project is generated, SNiFF+ will correctly use OfficeApp as the source code package root directory by default.
In the Byte-Code Package Root field, enter a name, e.g. Classes , for the generated byte-code root. When you compile, SNiFF+ will create a directory called Classes at the same level as the project root directory ( OfficeApp ). The byte-code will then be generated into the Classes directory (the javac compiler's -d option).
By default, the Create Subprojects check box is selected, which is correct.
Select the Use SNiFF+'s Makefiles checkbox.
Press Next.
In the "Specify Java Make Attributes" page
You are asked to enter Classpath(s) to external packages. You needn't enter anything here.
If you are using JDK 1.1.x, we assume you have already set a system environment variable for the JDK class library (under Preparing the Environment), so this need not be re-entered here. The SNiFF+ Classpath setting is generally used for libraries, where no source code is available. We do not use any such libraries in the example, so

- Press Next.

In the "Project Setup Summary" page
This page summarizes your specifications for the new SNiFF+ Java project and required Working Environments.

- Make sure that your Project Setup Summary page is similar the following. If it isn't, please go back to the beginning of the Wizard and start again.

- Press Finish.
SNiFF+ will now create the new

OfficeApp project and all its subprojects.
- In the dialog that appears asking if you want to generate cross reference information, press No.
Cross Reference information will be automatically generated when you open the Cross Referencer later on.
When SNiFF+ is finished, the new project is opened in the Project Editor.
Review
In this chapter you

- made the necessary preparations for your environment
- set the directory where SNiFF+ maintains working environments information
- set up a version controlled single-user project using the Project Setup Wizard